package com.shuda.business.engine.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * 数据池配置DTO
 * 用于接收和返回数据池配置数据
 * 
 * @author ink
 * @Description: 数据池配置DTO
 * @date 2024-10-10 15:05:00
 */
@Data
@Schema(description = "数据池配置DTO")
public class DataPoolDTO {

    @Schema(description = "数据池ID")
    private Long id;

    @Schema(description = "数据池名称", required = true)
    @NotBlank(message = "数据池名称不能为空")
    private String poolName;

    @Schema(description = "数据源类型(mysql,oracle,postgresql,mongodb)", required = true)
    @NotBlank(message = "数据源类型不能为空")
    private String dataSourceType;

    @Schema(description = "数据源连接配置(JSON格式存储)", required = true)
    @NotBlank(message = "数据源连接配置不能为空")
    private String dataSourceConfig;

    @Schema(description = "数据表名")
    private String tableName;

    @Schema(description = "字段映射配置(JSON格式存储)")
    private String fieldMapping;

    @Schema(description = "同步策略(realtime-实时,batch-批量)")
    private String syncStrategy;

    @Schema(description = "同步频率")
    private String syncFrequency;

    @Schema(description = "状态(enabled-启用,disabled-禁用)")
    private String status;

    @Schema(description = "描述信息")
    private String description;
}